package com.bkhc.common.entity;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Entity
@Data
@Table(name = "tbl_umc_api")
@EntityListeners(AuditingEntityListener.class)
public class ApiInfo {

    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Id
    private int id ;
    @Column(name = "code")
    private String code ;
    /**
     * rloe_name
     */
    @Column(name = "name")
    private String name;

    @Column(name = "api_package")
    private String apiPackage;
    /**
     * role_desc
     */
    @Column(name = "description")
    private String description;

    @Column(name = "url")
    private String api;

    @Column(name = "request_type")
    private String requestType;

    @Column(name = "type")
    private String apiType;

    @Column(name = "creator",updatable = false)
    private String creator;

    @Column(name = "create_date",updatable = false)
    @CreatedDate
    private Date createDate;

    @Column(name = "updator")
    private String updator;

    @LastModifiedDate
    @Column(name = "update_date")
    private Date updateDate;
}
